package com.kingdee.eas.fdc.customerservice.app;

import javax.ejb.*;
import java.rmi.RemoteException;
import com.kingdee.bos.*;
import com.kingdee.bos.util.BOSObjectType;
import com.kingdee.bos.metadata.IMetaDataPK;
import com.kingdee.bos.metadata.rule.RuleExecutor;
import com.kingdee.bos.metadata.MetaDataPK;
//import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.bos.framework.ejb.AbstractEntityControllerBean;
import com.kingdee.bos.framework.ejb.AbstractBizControllerBean;
//import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.dao.IObjectCollection;
import com.kingdee.bos.service.ServiceContext;
import com.kingdee.bos.service.IServiceContext;
import com.kingdee.eas.framework.Result;
import com.kingdee.eas.framework.LineResult;
import com.kingdee.eas.framework.exception.EASMultiException;
import com.kingdee.bos.dao.ormapping.ObjectUuidPK;

import java.lang.String;
import com.kingdee.bos.metadata.entity.EntityViewInfo;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.eas.fdc.propertymgmt.PPMBillCollection;
import com.kingdee.eas.fdc.customerservice.ServiceRergisterBillInfo;
import com.kingdee.eas.fdc.basedata.FDCBillStateEnum;
import com.kingdee.bos.metadata.entity.SelectorItemCollection;
import com.kingdee.eas.framework.CoreBaseCollection;
import com.kingdee.eas.fdc.customerservice.ServiceRergisterBillCollection;
import com.kingdee.eas.fdc.customerservice.ServiceRegisterBillStatusEnum;
import com.kingdee.eas.framework.CoreBillBaseCollection;
import com.kingdee.eas.fdc.customerservice.ServiceReturnEnum;
import com.kingdee.eas.framework.CoreBaseInfo;
import java.util.Collection;
import com.kingdee.eas.fdc.propertymgmt.PPMProjectBillCollection;
import com.kingdee.eas.fdc.basedata.FDCBillCollection;
import com.kingdee.eas.framework.ObjectBaseCollection;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.fdc.propertymgmt.app.PPMProjectBillControllerBean;



public abstract class AbstractServiceRergisterBillControllerBean extends PPMProjectBillControllerBean implements ServiceRergisterBillController
{
    protected AbstractServiceRergisterBillControllerBean()
    {
    }

    protected BOSObjectType getBOSType()
    {
        return new BOSObjectType("B1964EF3");
    }

    public ServiceRergisterBillInfo getServiceRergisterBillInfo(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("4b4f1888-c741-4f9b-960c-5dbc6e3453b1"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            ServiceRergisterBillInfo retValue = (ServiceRergisterBillInfo)_getValue(ctx, pk);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk);
    }

    public ServiceRergisterBillInfo getServiceRergisterBillInfo(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("129cba37-3bc5-44e2-8bd3-443df56ea220"), new Object[]{ctx, pk, selector});
            invokeServiceBefore(svcCtx);
            ServiceRergisterBillInfo retValue = (ServiceRergisterBillInfo)_getValue(ctx, pk, selector);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException
    {
        return super._getValue(ctx, pk, selector);
    }

    public ServiceRergisterBillInfo getServiceRergisterBillInfo(Context ctx, String oql) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("014df1e3-6fe2-44ec-aead-dc92a080bed1"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            ServiceRergisterBillInfo retValue = (ServiceRergisterBillInfo)_getValue(ctx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } catch (EASBizException ex0) {
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectValue _getValue(Context ctx, String oql) throws BOSException, EASBizException
    {
        return super._getValue(ctx, oql);
    }

    public ServiceRergisterBillCollection getServiceRergisterBillCollection(Context ctx) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("6f490161-4f74-49bf-93ee-cc09168a55ca"), new Object[]{ctx});
            invokeServiceBefore(svcCtx);
            ServiceRergisterBillCollection retValue = (ServiceRergisterBillCollection)_getCollection(ctx, svcCtx);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx) throws BOSException
    {
        return super._getCollection(ctx, svcCtx);
    }

    public ServiceRergisterBillCollection getServiceRergisterBillCollection(Context ctx, EntityViewInfo view) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("7480eafa-65d3-4548-8257-985d5d98e542"), new Object[]{ctx, view});
            invokeServiceBefore(svcCtx);
            ServiceRergisterBillCollection retValue = (ServiceRergisterBillCollection)_getCollection(ctx, svcCtx, view);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, EntityViewInfo view) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, view);
    }

    public ServiceRergisterBillCollection getServiceRergisterBillCollection(Context ctx, String oql) throws BOSException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("a59b509d-b3b4-4831-84d7-439056871850"), new Object[]{ctx, oql});
            invokeServiceBefore(svcCtx);
            ServiceRergisterBillCollection retValue = (ServiceRergisterBillCollection)_getCollection(ctx, svcCtx, oql);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            throw ex;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected IObjectCollection _getCollection(Context ctx, IServiceContext svcCtx, String oql) throws BOSException
    {
        return super._getCollection(ctx, svcCtx, oql);
    }

    public void updateBillStatus(Context ctx, IObjectPK pk, ServiceRegisterBillStatusEnum billStatus) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("abc48672-5d2c-4414-a21d-fa8402fb5ba9"), new Object[]{ctx, pk, billStatus});
            invokeServiceBefore(svcCtx);
            _updateBillStatus(ctx, pk, billStatus);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateBillStatus(Context ctx, IObjectPK pk, ServiceRegisterBillStatusEnum billStatus) throws BOSException, EASBizException;

    public Collection findProcessEntryInfoById(Context ctx, ServiceRergisterBillInfo registerBillInfo) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("34a1e77f-16e2-4d5d-a437-d630f282a8d7"), new Object[]{ctx, registerBillInfo});
            invokeServiceBefore(svcCtx);
            Collection retValue = (Collection)_findProcessEntryInfoById(ctx, registerBillInfo);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract Collection _findProcessEntryInfoById(Context ctx, ServiceRergisterBillInfo registerBillInfo) throws BOSException, EASBizException;

    public void updateReturnStatus(Context ctx, IObjectPK pk, ServiceReturnEnum returnStatus) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("1df74034-22e1-420d-afc5-295f893c9fb0"), new Object[]{ctx, pk, returnStatus});
            invokeServiceBefore(svcCtx);
            _updateReturnStatus(ctx, pk, returnStatus);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateReturnStatus(Context ctx, IObjectPK pk, ServiceReturnEnum returnStatus) throws BOSException, EASBizException;

    public void deleteReturnBillById(Context ctx, IObjectPK pk) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("d2c968aa-7d3d-4180-ab4b-53d367bd16fa"), new Object[]{ctx, pk});
            invokeServiceBefore(svcCtx);
            _deleteReturnBillById(ctx, pk);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _deleteReturnBillById(Context ctx, IObjectPK pk) throws BOSException, EASBizException;

    public void updateState(Context ctx, IObjectPK pk, FDCBillStateEnum state) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("0472da81-3430-45fb-a8bf-70f7ab4bbc22"), new Object[]{ctx, pk, state});
            invokeServiceBefore(svcCtx);
            _updateState(ctx, pk, state);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _updateState(Context ctx, IObjectPK pk, FDCBillStateEnum state) throws BOSException, EASBizException;

    public void submitForWF(Context ctx, ServiceRergisterBillInfo model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("3fb7c57b-726b-4f70-a054-fababcd83c89"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            _submitForWF(ctx, model);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _submitForWF(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public IObjectPK submitForRergisterBill(Context ctx, ServiceRergisterBillInfo model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("4ee4076d-5295-4775-9b82-5cdae68aa3cb"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_submitForRergisterBill(ctx, model);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _submitForRergisterBill(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public IObjectPK submitForProcessBill(Context ctx, ServiceRergisterBillInfo model) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("5a54a1b7-e44f-4631-a011-7dc47b57c1fc"), new Object[]{ctx, model});
            invokeServiceBefore(svcCtx);
            IObjectPK retValue = (IObjectPK)_submitForProcessBill(ctx, model);
            svcCtx.setMethodReturnValue(retValue);
            invokeServiceAfter(svcCtx);
            return retValue;
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract IObjectPK _submitForProcessBill(Context ctx, IObjectValue model) throws BOSException, EASBizException;

    public void checkCanCreateInspection(Context ctx, BOSUuid id) throws BOSException, EASBizException
    {
        try {
            ServiceContext svcCtx = createServiceContext(new MetaDataPK("ee124225-1e6b-47b4-8c8d-a8b40a495fbc"), new Object[]{ctx, id});
            invokeServiceBefore(svcCtx);
            _checkCanCreateInspection(ctx, id);
            invokeServiceAfter(svcCtx);
        } catch (BOSException ex) {
            this.setRollbackOnly();
            throw ex;
        } catch (EASBizException ex0) {
            this.setRollbackOnly();
            throw ex0;
        } finally {
            super.cleanUpServiceState();
        }
    }
    protected abstract void _checkCanCreateInspection(Context ctx, BOSUuid id) throws BOSException, EASBizException;

    public PPMProjectBillCollection getPPMProjectBillCollection (Context ctx) throws BOSException
    {
    	return (PPMProjectBillCollection)(getServiceRergisterBillCollection(ctx).cast(PPMProjectBillCollection.class));
    }
    public PPMProjectBillCollection getPPMProjectBillCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (PPMProjectBillCollection)(getServiceRergisterBillCollection(ctx, view).cast(PPMProjectBillCollection.class));
    }
    public PPMProjectBillCollection getPPMProjectBillCollection (Context ctx, String oql) throws BOSException
    {
    	return (PPMProjectBillCollection)(getServiceRergisterBillCollection(ctx, oql).cast(PPMProjectBillCollection.class));
    }
    public PPMBillCollection getPPMBillCollection (Context ctx) throws BOSException
    {
    	return (PPMBillCollection)(getServiceRergisterBillCollection(ctx).cast(PPMBillCollection.class));
    }
    public PPMBillCollection getPPMBillCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (PPMBillCollection)(getServiceRergisterBillCollection(ctx, view).cast(PPMBillCollection.class));
    }
    public PPMBillCollection getPPMBillCollection (Context ctx, String oql) throws BOSException
    {
    	return (PPMBillCollection)(getServiceRergisterBillCollection(ctx, oql).cast(PPMBillCollection.class));
    }
    public FDCBillCollection getFDCBillCollection (Context ctx) throws BOSException
    {
    	return (FDCBillCollection)(getServiceRergisterBillCollection(ctx).cast(FDCBillCollection.class));
    }
    public FDCBillCollection getFDCBillCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (FDCBillCollection)(getServiceRergisterBillCollection(ctx, view).cast(FDCBillCollection.class));
    }
    public FDCBillCollection getFDCBillCollection (Context ctx, String oql) throws BOSException
    {
    	return (FDCBillCollection)(getServiceRergisterBillCollection(ctx, oql).cast(FDCBillCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBillBaseCollection)(getServiceRergisterBillCollection(ctx).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBillBaseCollection)(getServiceRergisterBillCollection(ctx, view).cast(CoreBillBaseCollection.class));
    }
    public CoreBillBaseCollection getCoreBillBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBillBaseCollection)(getServiceRergisterBillCollection(ctx, oql).cast(CoreBillBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx) throws BOSException
    {
    	return (ObjectBaseCollection)(getServiceRergisterBillCollection(ctx).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (ObjectBaseCollection)(getServiceRergisterBillCollection(ctx, view).cast(ObjectBaseCollection.class));
    }
    public ObjectBaseCollection getObjectBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (ObjectBaseCollection)(getServiceRergisterBillCollection(ctx, oql).cast(ObjectBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx) throws BOSException
    {
    	return (CoreBaseCollection)(getServiceRergisterBillCollection(ctx).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, EntityViewInfo view) throws BOSException
    {
    	return (CoreBaseCollection)(getServiceRergisterBillCollection(ctx, view).cast(CoreBaseCollection.class));
    }
    public CoreBaseCollection getCoreBaseCollection (Context ctx, String oql) throws BOSException
    {
    	return (CoreBaseCollection)(getServiceRergisterBillCollection(ctx, oql).cast(CoreBaseCollection.class));
    }
}